package com.kingdom.admin.view;

import com.alibaba.fastjson.JSON;
import com.kingdom.admin.entity.SystemUser;
import com.kingdom.admin.service.SystemUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by xinchunting on 17-11-20.
 */
@RestController
public class APIUserController {

    @Autowired
    private SystemUserService systemUserService;


    @RequestMapping(value ="/api/admin/systemUser/create", method = RequestMethod.POST)
    public String list(SystemUser systemUser) {
        SystemUser systemUsers = systemUserService.insert(systemUser);
        return JSON.toJSONString(systemUsers);
    }
}
